<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>青铜会员注册</title>
<meta
	content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"
	name="viewport" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<link type="text/css" rel="stylesheet"
	href="/carworld_weixin/themes/css/base.css">
<link type="text/css" rel="stylesheet"
	href="/carworld_weixin/themes/css/home.css">
<link type="text/css" rel="stylesheet"
	href="/carworld_weixin/themes/css/icon.css">
</head>
<body>

	<header class="aui-navBar aui-navBar-fixed b-line">
		<a href="javascript:history.go(-1);" class="aui-navBar-item"> <i
			class="icon icon-return"></i>
		</a>
		<div class="aui-center">
			<span class="aui-center-title">青铜会员注册</span>
		</div>
		<a href="javascript:;" class="aui-navBar-item"> <i
			class="icon icon-sys"></i>
		</a>
	</header>
	<section class="aui-scrollView">
		<div class="aui-code-box">
			<div class="aui-cash-list aui-card-list">
				<!--<form name="verifyForm" id="verifyForm" method="post" action="">-->
				<p class="aui-code-line">
					<i class="icon icon-mine"></i> <input type="text"
						class="aui-code-line-input" name="name" value="" id="name"
						autocomplete="off" placeholder="请输入您的真实姓名">
				</p>
				<p class="aui-code-line">
					<i class="icon icon-phone"></i> <input type="text"
						class="aui-code-line-input" name="phone" value="" id="phone"
						autocomplete="off" placeholder="请输入您的预留手机号码">
				</p>
				<div class="aui-code-btn">
					<button id="verify">注册</button>
				</div>
				<!--</form>-->
			</div>
		</div>
		<div class="aui-Tips" style="padding: 1.5rem 1.5rem">
			<p>温馨提示：</p>
			<p>当您认证成功后,邀请朋友来本店消费将获得奖励</p>
		</div>

	</section>

</body>
<script type="text/javascript"
	src="/carworld_weixin/themes/js/jquery.min.js"></script>
<script type="text/javascript"
	src="/carworld_weixin/themes/js/slider.js"></script>
<script type="text/javascript" src="/carworld_weixin/themes/js/layer.js"></script>
<script type="text/javascript">
    $(document).ready(function () {

    });

    //button标签去除按钮默认submit事件
    $('#verify').click(function (e) {
        e.preventDefult;
        //校验内容是否为空
        if($("#name").val()!="" && $("#name").val()!=null && $("#phone").val()!="" && $("#phone").val()!=null){
            $('#verify').attr('disabled', 'disabled');
            $.ajax({
                url: "/carworld_weixin/vipcard/verifyShareHolder",
                type : 'POST',
                data:{"name":$("#name").val(),"phone":$("#phone").val()},
                success:function (data) {
                    console.log(data)
                    if(data=='y'){
                        alert('青铜会员身份注册通过，正在加载首页...');
                        window.location.href='/carworld_weixin/';
                    }else if(data=='n'){
                        $('#verify').removeAttr("disabled");
                        alert("注册失败,重新再来")
                    }else {
                        alert('您现在已经是青铜会员');
                        window.location.href='/carworld_weixin/';
					}
                }
            });
        }else {
            alert("信息不全,请填写完整!")
        }

    });

</script>
</html>
